package qc.module.platform.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.platform.dto.param.log.ParamValueLogDto;
import qc.module.platform.entity.QcParamValueLog;

import java.util.List;

/**
 * ParamValueLogMapper
 *
 * @author QuCheng Tech
 * @since 2024/2/22
 */
@Mapper
public interface ParamValueLogMapper {
    ParamValueLogMapper MAPPER = Mappers.getMapper(ParamValueLogMapper.class);

    @Mapping(target = "tm", source = "tm", dateFormat = "yyyy-MM-dd HH:mm:ss")
    ParamValueLogDto toDto(QcParamValueLog en);

    List<ParamValueLogDto> toDtoList(List<QcParamValueLog> list);
}
